package com.machine.service.user.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.machine.bean.Componentpart;
import com.machine.dao.user.ComponentDao;
import com.machine.service.user.ComponentServiceDao;

@Component(value = "componentService")
public class ComponentServiceDaoImpl implements ComponentServiceDao {

	private ComponentDao componentDao;

	public ComponentDao getComponentDao() {
		return componentDao;
	}

	@Resource
	public void setComponentDao(ComponentDao componentDao) {
		this.componentDao = componentDao;
	}

	@Override
	public void add(com.machine.bean.Componentpart component) {
		componentDao.add(component);

	}

	@Override
	public int delete(com.machine.bean.Componentpart component) {
		return componentDao.delete(component);
	}

	@Override
	public List<com.machine.bean.Componentpart> find(String name) {
		return componentDao.find(name);
	}

	@Override
	public int update(com.machine.bean.Componentpart component) {
		return componentDao.update(component);
	}

	@Override
	public List<Componentpart> findAll() {
		return componentDao.findAll();
	}

	@Override
	public int deleteByIdList(List<Integer> idList) {

		return componentDao.deleteByIdList(idList);
	}

	@Override
	public Componentpart findById(Integer id) {
		return componentDao.findById(id);
	}

}
